Skip to content

Conversation

@Hweinstock
Copy link
Contributor

Problem

The fsRead tool has had changes since #894 was merged. Additionally, the validate and invoke methods were combined previously, but have been separated here until the final implementation is more stable, and refactoring can be done with less churn.

Solution

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock Hweinstock marked this pull request as ready for review April 9, 2025 21:35
@Hweinstock Hweinstock requested a review from a team as a code owner April 9, 2025 21:35
agent.addTool(fsReadTool.getSpec(), async (input: FsReadParams) => {
// TODO: fill in logic for handling invalid tool invocations
// TODO: implement chat streaming via queueDescription.
await fsReadTool.validate(input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will throw errors to be handled by the chatController (which I think is fine, but good to be aware of).

Copy link
Contributor Author

@Hweinstock Hweinstock Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wasn't sure if this should be handled in the handler or in the chatController itself which is why I added the comment.

However, I imagine handling these agent errors in one place and allowing handlers to throw is better design, so good call out!

@Hweinstock Hweinstock merged commit 101007f into aws:main Apr 11, 2025
10 of 11 checks passed
@Hweinstock Hweinstock deleted the fsRead/sync branch April 11, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants